import { IPSModelSortable } from '../ipsmodel-sortable';
import { IPSSubSysServiceAPIDEField } from './ipssub-sys-service-apidefield';
import { PSModelObjectImpl } from '../psmodel-object-impl';

export class PSSubSysServiceAPIDEFieldImpl extends PSModelObjectImpl implements IPSSubSysServiceAPIDEField, IPSModelSortable {
  get codeName(): string {
    return this.M.codeName;
  }

  get codeName2(): string {
    return this.M.codeName2;
  }

  get dataType():
    | 'ACID'
    | 'BIGINT'
    | 'CODELISTTEXT'
    | 'CURRENCY'
    | 'CURRENCYUNIT'
    | 'DATE'
    | 'DATETIME'
    | 'DATETIME_BIRTHDAY'
    | 'DECIMAL'
    | 'BIGDECIMAL'
    | 'FLOAT'
    | 'GUID'
    | 'HTMLTEXT'
    | 'INHERIT'
    | 'INT'
    | 'LONGTEXT'
    | 'LONGTEXT_1000'
    | 'NBID'
    | 'NMCODELIST'
    | 'NSCODELIST'
    | 'PICKUP'
    | 'PICKUPDATA'
    | 'PICKUPTEXT'
    | 'SBID'
    | 'SMCODELIST'
    | 'SSCODELIST'
    | 'TEXT'
    | 'TEXT_EMAIL'
    | 'TIME'
    | 'TRUEFALSE'
    | 'VARBINARY'
    | 'WFSTATE'
    | 'YESNO'
    | 'ONE2MANYDATA'
    | 'ONE2MANYDATA_MAP'
    | 'PICKUPOBJECT'
    | 'ONE2ONEDATA'
    | 'FILE'
    | 'ONE2MANYOBJ'
    | 'ONE2MANYOBJ_MAP'
    | 'ONE2ONEOBJ'
    | 'FILELIST'
    | 'LONGFILELIST'
    | 'PICTURE'
    | 'PICTURELIST'
    | 'LONGPICTURELIST'
    | 'TEXTARRAY'
    | 'TEXTARRAY2'
    | 'INTARRAY'
    | 'INTARRAY2'
    | 'BIGINTARRAY'
    | 'BIGINTARRAY2'
    | 'FLOATARRAY'
    | 'FLOATARRAY2'
    | 'DECIMALARRAY'
    | 'DECIMALARRAY2' {
    return this.M.dataType;
  }

  get dynaModelFilePath(): string {
    return this.M.dynaModelFilePath;
  }

  get fieldTag(): string {
    return this.M.fieldTag;
  }

  get fieldTag2(): string {
    return this.M.fieldTag2;
  }

  get length(): number {
    return this.M.length != null ? this.M.length : 0;
  }

  get logicName(): string {
    return this.M.logicName;
  }

  get memo(): string {
    return this.M.memo;
  }

  get name(): string {
    return this.M.name;
  }

  get orderValue(): number {
    return this.M.orderValue != null ? this.M.orderValue : 99999;
  }

  get precision(): number {
    return this.M.precision != null ? this.M.precision : 0;
  }

  get stdDataType(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 {
    return this.M.stdDataType;
  }

  get userCat(): string {
    return this.M.userCat;
  }

  get userTag(): string {
    return this.M.userTag;
  }

  get userTag2(): string {
    return this.M.userTag2;
  }

  get userTag3(): string {
    return this.M.userTag3;
  }

  get userTag4(): string {
    return this.M.userTag4;
  }

  get allowEmpty(): boolean {
    return this.M.allowEmpty != null ? this.M.allowEmpty : true;
  }

  get keyDEField(): boolean {
    return this.M.keyDEField != null ? this.M.keyDEField : false;
  }

  get majorDEField(): boolean {
    return this.M.majorDEField != null ? this.M.majorDEField : false;
  }

  get cls(): string {
    return 'PSSubSysServiceAPIDEFieldImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'IPSModelSortable' || cls == 'service.IPSSubSysServiceAPIDEField') return true;
    return super.instanceof(cls);
  }
}
